home *** CD-ROM | disk | FTP | other *** search
- package koala.dynamicjava.interpreter.modifier;
-
- import java.lang.reflect.Field;
- import koala.dynamicjava.interpreter.context.Context;
- import koala.dynamicjava.interpreter.error.CatchedExceptionError;
- import koala.dynamicjava.tree.SuperFieldAccess;
- import koala.dynamicjava.tree.visitor.Visitor;
-
- public class SuperFieldModifier extends LeftHandSideModifier {
- protected Field field;
- protected SuperFieldAccess node;
-
- public Object prepare(Visitor var1, Context var2) {
- try {
- return this.field.get(var2.get("this"));
- } catch (Exception var4) {
- throw new CatchedExceptionError(var4, this.node);
- }
- }
-
- public void modify(Context var1, Object var2) {
- try {
- this.field.set(var1.get("this"), var2);
- } catch (Exception var4) {
- throw new CatchedExceptionError(var4, this.node);
- }
- }
-
- public SuperFieldModifier(Field var1, SuperFieldAccess var2) {
- this.field = var1;
- this.node = var2;
- }
- }
-